home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 106 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. From: Xavier Tarrago <tarrago@lcus15.saclay.cea.fr>
  2. Message-ID: <4e2bpd$4fm@news.cea.fr>
  3. X-Original-Date: 23 Jan 1996 10:03:25 GMT
  4. Path: in1.uu.net!bounce-back
  5. Date: 23 Jan 96 10:39:57 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Template class member functions reuse
  9. Organization: CEA Commissariat a l'Energie Atomique, France.
  10. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  11.     iQBFAgUBMQS7C+EDnX0m9pzZAQGSVgF/fdyUq4PDOcVnzYb8wlpiqzlE5zGlHBwt
  12.     soxPAIwbHAdHR22X5DUU5I8TYuFhYs5x
  13.     =BmK+
  14.  
  15.   Assume a class template specialization:
  16. template <class T> class dummy {
  17. public:
  18.     dummy();
  19.     dummy( const dummy<T>&);
  20.     ~dummy();
  21.  
  22.     f1( double);
  23.     f2( int);
  24.     f3...
  25. ..};
  26. template <double> class dummy {
  27. public:
  28.     dummy();
  29.     dummy( const dummy<T>&);
  30.     ~dummy();
  31.  
  32.     f1( double);
  33.     f2( int);
  34.     f3...
  35. ..};
  36.  Assume that only member function f1 needs to be redefined.
  37.  Have all function members f2, f3, ... to be available in the specialized
  38. form ?
  39.  Or can I expect that the compiler will expand them from their
  40. template <class T> definition.
  41.   Thank for help.
  42.    X.Tarrago
  43. ---
  44. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  45.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  46.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  47.